<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
    <script type="text/javascript">
      let json = {a: 12, b: 5};

      let str = "test?data=" +encodeURIComponent(JSON.stringify(json));

      alert(str);
    </script>
  </head>
  <body>

  </body>
</html>
